Skip to content

tools/ci: the Boost action patches mul128.hpp for MSVC ARM64 until boostorg/hash2#49 ships - #54

Merged
pinhopro merged 1 commit into
mainfrom
build/boost-hash2-mul128
Nov 23, 2026
Merged

pinhopro merged 1 commit into
mainfrom
build/boost-hash2-mul128

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

Boost 1.92.0's boost/hash2/detail/mul128.hpp repeats, in the #elif defined(_M_ARM64) || defined(_M_ARM64EC) branch of mul128, the signature and opening brace of mul128_impl, so MSVC for ARM64 stops with C2601 in every translation unit that includes boost/hash2/xxh3.hpp (most of webcpp::crypto and webcpp::hash). Upstream fix: boostorg/hash2#49. The owner approved carrying it locally until a Boost release contains it.

How it is applied: in the one place that provisions Boost for every CI job (lanes, MSVC included, docs, lint, site), tools/ci/actions/boost/install.sh.

  • tools/ci/actions/boost/patches/hash2-mul128-msvc-arm64.patch: a git apply patch of Boost's headers against the archive's root; its opening paragraph names Fix MSVC ARM64 build of mul128 boostorg/hash2#49.
  • install.sh applies every patch to each tree it extracts (install and source), before anything is installed or kept. A patch that no longer applies, or that the archive already holds (a new Boost with the fix), fails the action naming it, so it is removed rather than skipped; one touching anything outside boost/ is refused. git apply runs with GIT_CEILING_DIRECTORIES, so a tree inside a git repository is patched rather than silently skipped.
  • The patches are part of the Boost cache key, and check (run by install and configure) refuses a prefix whose headers lack one.
  • Ruling recorded in CODING-GUIDELINES.md chapter 14 (the build); AGENTS.md's description of the action updated.

Verification, local:

  • The real install.sh install on macOS with the pinned archive: the installed mul128.hpp has exactly the two lines removed; configure accepts the prefix.
  • Native clang build against that prefix: libs/crypto/test//async_post (includes xxh3.hpp and the patched mul128.hpp) and //equal pass.
  • tools/ci/actions_test.py: all cases pass, with four new ones (patched headers, also inside a git repository; key changes with the patches; failure on an already-applied, a stale and an out-of-headers patch; each patch names its upstream fix).
  • Linux lint lane (files mode): CLEAN.
  • MSVC 14.3 ARM64: the VM lane was busy during this change; the windows-lane run of 2026-11-22 with the same header change in the VM's Boost compiled and passed the 110 translation units that had failed with C2601.

…ostorg/hash2#49 ships

Boost 1.92.0's boost/hash2/detail/mul128.hpp repeats, in its _M_ARM64 branch,
the signature and opening brace of mul128_impl, so MSVC for ARM64 stops with
C2601 in every translation unit that includes boost/hash2/xxh3.hpp, most of
webcpp::crypto and webcpp::hash.

tools/ci/actions/boost/install.sh, which provisions Boost for every CI job
(the lanes, the MSVC ones among them, the docs, the lint and the site), now
applies each patch of tools/ci/actions/boost/patches to the tree it extracts
before anything is installed or kept from it. A patch that no longer applies,
or that the archive already holds, fails the action naming it, so that it is
removed rather than skipped; the patches are part of the cache key; and
configure refuses a prefix whose headers lack one. git apply runs with
GIT_CEILING_DIRECTORIES so that a tree inside a repository is patched rather
than skipped without a word.

The first patch removes the two repeated lines, as the upstream fix does
(boostorg/hash2#49). The ruling, approved by the owner
on 2026-11-22, is recorded in CODING-GUIDELINES.md chapter 14.
@pinhopro
pinhopro merged commit 1e3bafd into main Nov 23, 2026
1 of 19 checks passed
@pinhopro
pinhopro deleted the build/boost-hash2-mul128 branch November 23, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant